const router = require('koa-router')()
const validate = require('koa2-validation')
const music = require('../controllers/music')
const auth = require('../controllers/auth')

router.prefix('/musics')

router.get('/', music.getMusic)

router.post('/',
  auth.jwtAuth,
  validate(music.v.postMusic),
  music.postMusic
)

module.exports = router
